
package com.hlkj.pay.service.devices.impl;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.util.List;

import org.springframework.stereotype.Service;

import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.hlkj.pay.infrastructure.mapper.devices.MerchantQrTemplateMapper;
import com.hlkj.pay.infrastructure.model.devices.MerchantQrTemplateDO;
import com.hlkj.pay.service.devices.IMerchantQrTemplateService;
import com.hlkj.pay.vo.BasePageReq;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @author HlpayTeam
 * @date 2025/01/20 11:11
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class MerchantQrTemplateServiceImpl implements IMerchantQrTemplateService {

    private final MerchantQrTemplateMapper merchantQrTemplateMapper;

    @Override
    public PageResult<MerchantQrTemplateDO> queryPage(BasePageReq basePageReq) {
        LambdaQueryWrapperX<MerchantQrTemplateDO> queryWrapper = new LambdaQueryWrapperX<>();
        return merchantQrTemplateMapper.selectPage(basePageReq, queryWrapper);
    }

    @Override
    public List<MerchantQrTemplateDO> queryList(BasePageReq basePageReq) {
        return merchantQrTemplateMapper.selectList();
    }

    @Override
    public void insert(MerchantQrTemplateDO merchantQrTemplateDO) {
        merchantQrTemplateMapper.insert(merchantQrTemplateDO);
    }

    @Override
    public MerchantQrTemplateDO queryDetail(Long id) {
        return merchantQrTemplateMapper.selectById(id);
    }

    @Override
    public void update(MerchantQrTemplateDO merchantQrTemplateDO) {
        merchantQrTemplateMapper.updateById(merchantQrTemplateDO);
    }
}
